package com.wangsd.web.coupon.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.*;
import java.util.Date;

/**
 * 活动关联关系表（活动商品与优惠卷）
 */
@Data
@Entity
@Table(name = "activity_product_relation")
@ApiModel(value = "活动关联关系表（活动商品与优惠卷）", description = "活动关联关系表（活动商品与优惠卷）（限时抢购）")
public class ActivityProductRelation {
    @ApiModelProperty(value = "id")
    /*mybatis plus 自增主键*/
    @TableId(type = IdType.AUTO)
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private Date createdTime;

    @ApiModelProperty(value = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updatedTime;

    @ApiModelProperty(value = "（逻辑删除）是否已删；0，未删，1，已删")
    @TableField(fill = FieldFill.INSERT)
    private Integer deleted;

    @ApiModelProperty(value = "activity_product 主键id")
    private Long activityProductId;

    @ApiModelProperty(value = "商品id或者优惠券id")
    private String objectId;
}
